package com.godyhm.example.userendport.Protocol;

public class ProtocolData {
	private byte[] data = null;
	private int totalDataBytes = 0;
	/**
	 * data description size
	 * */
	private int dataHeadSize;
	/**
	 * need to send ack frame to the sender or not 0 no; 1 yes
	 * */
	private byte confirmFlag;

	/**
	 * keep incomplete frames in buffer or not
	 * */
	private byte bufferFlag;

	public ProtocolData() {
		data = null;
		totalDataBytes = 0;
	}

	public ProtocolData(byte[] data, int totalDataBytes) {
		this.setData(data);
		this.setTotalDataBytes(totalDataBytes);
	}

	public int getTotalDataBytes() {
		return totalDataBytes;
	}

	public void setTotalDataBytes(int totalDataBytes) {
		this.totalDataBytes = totalDataBytes;
	}

	public byte[] getData() {
		return data;
	}

	public void setData(byte[] data) {
		this.data = data;
	}
};